import BasicLayout from '../layouts/BasicLayout';

import Analysis from '../routes/Dashboard/Analysis';
import UserDetail from '../routes/User/UserDetail';
import CheckProfile from '../routes/User/CheckProfile';

import ServiceAdd from '../routes/Service/ServiceAdd';
import ServiceEdit from '../routes/Service/ServiceEdit';

import UserList from '../routes/User/UserList';
import CheckList from '../routes/User/BasicList';
import ServiceList from '../routes/Service/ServiceList';
import ServiceOrderList from '../routes/Service/ServiceOrderList';
import ServiceOrderDetail from '../routes/Service/ServiceOrderDetail'
import CategoryList from '../routes/Shop/CategoryList';
import CategoryAdd from '../routes/Shop/CategoryAdd';
import CategoryEdit from '../routes/Shop/CategoryEdit';

import ChargeList from '../routes/User/ChargeList';

import GoodList from '../routes/Shop/GoodList';
import GoodAdd from '../routes/Shop/GoodAdd';
import GoodEdit from '../routes/Shop/GoodEdit';
import GoodOrderList from '../routes/Shop/GoodOrderList';
import GoodOrderProfile from "../routes/Shop/GoodOrderProfile";
import CashList from "../routes/Cash/CashList";
import AdvertList from "../routes/Advert/AdvertList";
import AdvertAdd from "../routes/Advert/AdvertAdd";
import AdvertEdit from "../routes/Advert/AdvertEdit";
import SliderList from "../routes/Slider/SliderList";
import SliderAdd from "../routes/Slider/SliderAdd";
import SliderEdit from "../routes/Slider/SliderEdit";
import Coupon from "../routes/User/Coupon";
import CouponList from "../routes/Coupon/Coupon";

import Setting from "../routes/Setting/Setting";
import Exception403 from '../routes/Exception/403';
import ChangeCheckList from "../routes/User/ChangeCheckList";
import CouponGroup from "../routes/Coupon/CouponGroup";

const data = [{
    component: BasicLayout,
    layout: 'BasicLayout',
    name: '首页', // for breadcrumb
    path: '',
    children: [
        {
            name: '控制台',
            icon: 'dashboard',
            path: 'dashboard',
            component: Analysis,
        },
        {
            name: '用户管理',
            path: 'manager',
            icon: 'user',
            requiredAdmin: false,
            children: [
                {
                    name: '会员列表',
                    path: 'list',
                    requiredAdmin: false,
                    component: UserList,
                }, {
                    name: '师傅认证',
                    path: 'check',
                    requiredAdmin: true,
                    component: CheckList,
                },
                {
                    name: '工种变更审核',
                    path: 'change',
                    requiredAdmin: true,
                    component: ChangeCheckList,
                },
                {
                    name: '认证详情',
                    hidden: true,
                    path: 'check/:id',
                    component: CheckProfile,
                },
                {
                    hidden: true,
                    name: '会员详情',
                    path: '/:id',
                    requiredAdmin: false,
                    component: UserDetail,
                },
                // {
                //     hidden: true,
                //     name: '优惠券管理',
                //     path: '/:id/coupon',
                //     requiredAdmin: false,
                //     component: Coupon,
                // },
            ],
        },
        {
            name: '服务管理',
            path: 'service',
            icon: 'form',
            requiredAdmin: false,
            children: [{
                name: '服务列表',
                path: 'list',
                requiredAdmin: false,
                component: ServiceList,
            }, {
                name: '新增服务',
                path: 'list/add',
                hidden: true,
                requiredAdmin: true,
                component: ServiceAdd,
            }, {
                name: '编辑服务',
                path: 'list/:id',
                hidden: true,
                requiredAdmin: true,
                component: ServiceEdit,
            },
                {
                    name: '服务订单',
                    path: 'order',
                    requiredAdmin: false,
                    component: ServiceOrderList,
                },
                {

                    name: '订单详情',
                    hidden: true,
                    path: 'order/:id',
                    requiredAdmin: false,
                    component: ServiceOrderDetail,
                },
            ],
        },
        {
            name: '商品管理',
            path: 'shop',
            icon: 'shopping-cart',
            children: [
                {
                    name: '分类列表',
                    path: 'category',
                    requiredAdmin: false,
                    component: CategoryList,
                },
                {
                    hidden: true,
                    name: '添加分类',
                    path: 'category/add',
                    requiredAdmin: true,
                    component: CategoryAdd,
                },
                {
                    hidden: true,
                    name: '编辑分类',
                    path: 'category/:id',
                    requiredAdmin: true,
                    component: CategoryEdit,
                },
                {
                    name: '商品列表',
                    path: 'good',
                    requiredAdmin: false,
                    component: GoodList,
                },
                {
                    hidden: true,
                    name: '添加商品',
                    path: 'good/add',
                    requiredAdmin: true,

                    component: GoodAdd,
                },
                {
                    hidden: true,
                    name: '编辑商品',
                    path: 'good/:id',
                    requiredAdmin: true,
                    component: GoodEdit,
                },
                {
                    name: '商品订单',
                    path: 'good_order',
                    component: GoodOrderList,
                }, {
                    hidden: true,
                    name: '订单详情',
                    path: 'good_order/:id',
                    component: GoodOrderProfile,
                }
            ],
        },
        {
            name: '资产管理',
            path: 'money',
            requiredAdmin: false,
            icon: 'info-circle',
            children: [
                {
                    name: '提现管理',
                    path: 'cash',
                    component: CashList,
                },
                {
                    name: '充值记录',
                    path: 'charge',
                    component: ChargeList,
                },
            ],
        },
        {
            name: '营销管理',
            path: 'act',
            icon: 'info-circle',
            requiredAdmin: false,
            children: [
                {
                    name: '广告管理',
                    path: 'advert',
                    requiredAdmin: true,
                    component: AdvertList,
                },
                {
                    hidden: true,
                    name: '广告添加',
                    path: 'advert/add',
                    component: AdvertAdd,
                },
                {
                    hidden: true,
                    name: '广告编辑',
                    path: 'advert/:id',
                    component: AdvertEdit,
                },
                {
                    name: '轮播图管理',
                    path: 'slider',
                    component: SliderList,
                },

                {
                    hidden: true,
                    name: '轮播图添加',
                    path: 'slider/add',
                    component: SliderAdd,
                },
                {
                    hidden: true,
                    name: '轮播图编辑',
                    path: 'slider/:id',
                    component: SliderEdit,
                },
            ],
        },
        {
            name: '优惠券管理',
            path: 'coupon',
            icon: 'info-circle',

            children:[
                {
                    name: '优惠券组',
                    path: 'group',
                    component: CouponGroup,
                },
                {
                    hidden: true,
                    name: '优惠券组详情',
                    path: 'group/:id',
                    component: CouponList,
                },
            ]
        },
        {
            name: '设置',
            path: 'setting',
            icon: 'setting',
            requiredAdmin: true,
            component: Setting,
        },
        {
            name: '没有权限',
            path: '403',
            icon: 'setting',
            hidden: true,
            component: Exception403,
        }
    ],
//         {
//             name: '列表页',
//             path: 'list',
//             icon: 'table',
//             children: [{
//                 name: '查询表格',
//                 path: 'table-list',
//                 component: TableList,
//             }, {
//                 name: '标准列表',
//                 path: 'basic-list',
//                 component: BasicList,
//             }, {
//                 name: '卡片列表',
//                 path: 'card-list',
//                 component: CardList,
//             }, {
//                 name: '搜索列表（项目）',
//                 path: 'cover-card-list',
//                 component: CoverCardList,
//             }, {
//                 name: '搜索列表（应用）',
//                 path: 'filter-card-list',
//                 component: FilterCardList,
//             }, {
//                 name: '搜索列表（文章）',
//                 path: 'search',
//                 component: SearchList,
//             }],
//         },
//         {
//             name: '详情页',
//             path: 'profile',
//             icon: 'profile',
//             children: [{
//                 name: '基础详情页',
//                 path: 'basic',
//                 component: BasicProfile,
//             }, {
//                 name: '高级详情页',
//                 path: 'advanced',
//                 component: AdvancedProfile,
//             }],
//         }, {
//             name: '结果',
//             path: 'result',
//             icon: 'check-circle-o',
//             children: [{
//                 name: '成功',
//                 path: 'success',
//                 component: Success,
//             }, {
//                 name: '失败',
//                 path: 'fail',
//                 component: Error,
//             }],
//         }, {
//             name: '异常',
//             path: 'exception',
//             icon: 'warning',
//             children: [{
//                 hidden: true,
//                 name: '403',
//                 path: '403',
//                 component: Exception403,
//             }, {
//                 name: '404',
//                 path: '404',
//                 component: Exception404,
//             }, {
//                 name: '500',
//                 path: '500',
//                 component: Exception500,
//             }],
//         }],
// }, {
//     component: UserLayout,
//     layout: 'UserLayout',
//     children: [{
//         name: '帐户',
//         icon: 'user',
//         path: 'user',
//         children: [{
//             name: '登录',
//             path: 'login',
//             component: Login,
//         }, {
//             name: '注册',
//             path: 'register',
//             component: Register,
//         }, {
//             name: '注册结果',
//             path: 'register-result',
//             component: RegisterResult,
//         }],
//     }],
// }, {
//     component: BlankLayout,
//     layout: 'BlankLayout',
//     children: {
//         name: '使用文档',
//         path: 'http://pro.ant.design/docs/getting-started',
//         target: '_blank',
//         icon: 'book',
//     },
},
];

export function getNavData() {
    return data;
}

export default data;
